import { functionCommon, requestCommon } from "@whzhuke/common"

export default {
  list: (params: any) => {
    return requestCommon.get<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/contracts/by/provider`,
      params
    })
  },//查询合同分页列表
  add: (params: any) => {
    return requestCommon.postJson<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/contracts/`,
      params
    })
  },//添加合同
  edit: (params: any) => {
    return requestCommon.put<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/contracts/`,
      params
    })
  },//修改合同
  item: (params: any) => {
    return requestCommon.get<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/contracts/${params.id}`
    })
  },//查询合同详情
  send: (params: any) => {
    return requestCommon.postJson<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/contracts/send`,
      params
    })
  },//发送合同
  confirm: (params: any) => {
    return requestCommon.postJson<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/contracts/confirm`,
      params
    })
  },//确认合同
  userCombo: (params: any) => {
    return requestCommon.get<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/sys/user/combo`,
      params
    })
  }//查询用户信息(下拉框专用)

}
